package com.bh.controller;

import com.bh.remote.StockRemoteClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Wang
 * @version 1.0
 * @date 2022/6/8 20:09
 */
@RestController
public class SaleController {

    @Autowired
    StockRemoteClient stockRemoteClient;

    @GetMapping("/sale/query")
    public Map query(){
      Map map = new HashMap();
      map.put("saveNo","XS2022-001");
      Map rs=stockRemoteClient.query();
      map.put("stock",rs);
      return map;
    }
}
